<script setup>
const props = defineProps({
  src: { type: String, },
  imgList: { type: Array },
})
</script>

<template>
  <el-image class="comment-img" :src="src" :zoom-rate="1.2" :preview-src-list="imgList ? imgList : [src]"
    :initial-index="0" fit="scale-down" loading="lazy" hide-on-click-modal></el-image>
</template>

<style scoped>
.comment-img {
  width: 100px;
  height: 100px;
  background-color: #eee;
}

:deep(.el-image__preview) {
  cursor: zoom-in !important;
}
</style>